<!DOCTYPE html>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
--><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
<meta name="generator" content="joDoc">
<title>Apache Cordova API Documentation</title>
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
</head>
<body>
        <div id="header">
            <h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
            <small>
                <select><optgroup label="English" value="en">
<option value="edge">edge</option>
<option value="2.2.0rc2">2.2.0rc2</option>
<option value="2.2.0rc1">2.2.0rc1</option>
<option selected value="2.2.0">2.2.0</option>
<option value="2.1.0rc2">2.1.0rc2</option>
<option value="2.1.0rc1">2.1.0rc1</option>
<option value="2.1.0">2.1.0</option>
<option value="2.0.0rc1">2.0.0rc1</option>
<option value="2.0.0">2.0.0</option>
<option value="1.9.0rc1">1.9.0rc1</option>
<option value="1.9.0">1.9.0</option>
<option value="1.8.1">1.8.1</option>
<option value="1.8.0rc1">1.8.0rc1</option>
<option value="1.8.0">1.8.0</option>
<option value="1.7.0rc1">1.7.0rc1</option>
<option value="1.7.0">1.7.0</option>
<option value="1.6.1">1.6.1</option>
<option value="1.6.0rc1">1.6.0rc1</option>
<option value="1.6.0">1.6.0</option>
<option value="1.5.0rc1">1.5.0rc1</option>
<option value="1.5.0">1.5.0</option>
<option value="1.4.1">1.4.1</option>
<option value="1.4.0rc1">1.4.0rc1</option>
<option value="1.4.0">1.4.0</option>
<option value="1.3.0">1.3.0</option>
<option value="1.2.0">1.2.0</option>
<option value="1.1.0">1.1.0</option>
<option value="1.0.0rc3">1.0.0rc3</option>
<option value="1.0.0rc2">1.0.0rc2</option>
<option value="1.0.0rc1">1.0.0rc1</option>
<option value="1.0.0">1.0.0</option>
<option value="0.9.6">0.9.6</option>
<option value="0.9.5.1">0.9.5.1</option>
<option value="0.9.5">0.9.5</option>
<option value="0.9.4">0.9.4</option>
<option value="0.9.3">0.9.3</option>
<option value="0.9.2">0.9.2</option>
</optgroup>
<optgroup label="Español" value="es"><option value="1.0.0">1.0.0</option></optgroup>
<optgroup label="Français" value="fr">
<option value="1.3.0">1.3.0</option>
<option value="1.2.0">1.2.0</option>
<option value="1.1.0">1.1.0</option>
</optgroup>
<optgroup label="Japanese" value="jp">
<option value="2.0.0">2.0.0</option>
<option value="1.9.0">1.9.0</option>
<option value="1.8.1">1.8.1</option>
<option value="1.7.0">1.7.0</option>
<option value="0.9.5">0.9.5</option>
</optgroup>
<optgroup label="Korean" value="kr"><option value="2.0.0">2.0.0</option></optgroup></select></small>
        </div>
        <div id="subheader">
            <h1>Upgrading Cordova iOS</h1>
            <small><select><option value="Upgrading%2520Cordova%2520iOS">Upgrading Cordova iOS</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_2_1_0_projects_to_2_2_0">      - Upgrading Cordova 2.1.0 projects to 2.2.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_2_0_0_projects_to_2_1_0">      - Upgrading Cordova 2.0.0 projects to 2.1.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_9_0_projects_to_2_0_0">      - Upgrading Cordova 1.9.0 projects to 2.0.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_8_x_projects_to_1_9_0">      - Upgrading Cordova 1.8.x projects to 1.9.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_7_0_projects_to_1_8_x">      - Upgrading Cordova 1.7.0 projects to 1.8.x</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_6_x_projects_to_1_7_0">      - Upgrading Cordova 1.6.x projects to 1.7.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_5_0_projects_to_1_6_x">      - Upgrading Cordova 1.5.0 projects to 1.6.x</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_4_x_projects_to_1_5_0">      - Upgrading Cordova 1.4.x projects to 1.5.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_4_0_projects_to_1_4_1">      - Upgrading Cordova 1.4.0 projects to 1.4.1</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_3_0_projects_to_1_4_0">      - Upgrading Cordova 1.3.0 projects to 1.4.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_2_0_projects_to_1_3_0">      - Upgrading Cordova 1.2.0 projects to 1.3.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_1_0_projects_to_1_2_0">      - Upgrading Cordova 1.1.0 projects to 1.2.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_1_0_0_projects_to_1_1_0">      - Upgrading Cordova 1.0.0 projects to 1.1.0</option>
<option value="Upgrading%20Cordova%20iOS_upgrading_cordova_0_9_6_projects_to_1_0_0">      - Upgrading Cordova 0.9.6 projects to 1.0.0</option></select></small>
        </div>

        <div id="sidebar">
            <div class="vertical_divider"></div>
        <h1>API Reference</h1>
<ul>
<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
<li><a href="cordova_device_device.md.html#Device">Device</a></li>
<li><a href="cordova_events_events.md.html#Events">Events</a></li>
<li><a href="cordova_file_file.md.html#File">File</a></li>
<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
<li><a href="cordova_globalization_globalization.md.html#Globalization">Globalization</a></li>
<li><a href="cordova_media_media.md.html#Media">Media</a></li>
<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
<li><a href="cordova_splashscreen_splashscreen.md.html#Splashscreen">Splashscreen</a></li>
<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
</ul>
<h1>Guides</h1>
<ul>
<li><a href="guide_getting-started_index.md.html#Getting%20Started%20Guides">Getting Started Guides</a></li>
<li><a href="guide_command-line_index.md.html#Command-Line%20Usage">Command-Line Usage</a></li>
<li><a href="guide_upgrading_index.md.html#Upgrading%20Guides">Upgrading Guides</a></li>
<li><a href="guide_project-settings_index.md.html#Project%20Settings">Project Settings</a></li>
<li><a href="guide_plugin-development_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
<li><a href="guide_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
<li><a href="guide_cordova-webview_index.md.html#Embedding%20WebView">Embedding WebView</a></li>
<li><a href="_index.html">Keyword Index</a></li>
</ul>
</div>

        <div id="scrollable">
            <div id="content">
                <h1><a name="Upgrading%20Cordova%20iOS">Upgrading Cordova iOS</a></h1>

<p>Please note that <strong>Xcode 4.5 is required</strong>. To submit to the Apple App Store, you must use the latest shipped version of the iOS SDK, which is iOS 6. The iOS 6 SDK requires Xcode 4.5.</p>

<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_2_1_0_projects_to_2_2_0">Upgrading Cordova 2.1.0 projects to 2.2.0</a>
</h2>

<ol>
<li>
<strong>Download and extract the Cordova 2.2.0 source</strong> to a <strong>permanent folder location</strong> on your hard drive (say to ~/Documents/Cordova-2.2.0)</li>
<li>
<strong>Quit Xcode</strong> if it is running.</li>
<li>
<strong>Navigate</strong> to the directory where you put the downloaded source above, using <strong>Terminal.app</strong>.</li>
<li>
<a href="guide_command-line_index.md.html#Command-Line%20Usage_ios"><strong>Create a new project</strong></a> from the command-line tools - you will have to grab the assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-2.2.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-2.1.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-2.2.0.js</strong> file</li>
<li>Update (or replace, if you never changed the file) your <strong>MainViewController.m</strong> according to the one from the new project:
<ul>
<li>Updated -&gt; viewWillAppear</li>
</ul>
</li>
<li>Copy the <strong>"cordova"</strong> folder from the new project into your project's root folder <strong>(in 2.2.0, this has an updated 'emulate' script)</strong> </li>
<li>
<p>Next, update your CordovaLib sub-project reference. Beginning with Cordova 2.1.0, we are not using the CORDOVALIB Xcode variable anymore when referencing where CordovaLib resides, the reference is an absolute file reference now.</p>

<ol>
<li>Launch <strong>Terminal.app</strong>
</li>
<li>Go to the location where you installed Cordova <strong>(see Step 1)</strong>, in the <strong>bin</strong> sub-folder</li>
<li>
<p>Run the script below where the first parameter is the path to your project's <strong>.xcodeproj</strong> file:</p>

<p><code>update_cordova_subproject path/to/your/project/xcodeproj</code></p>
</li>
</ol>
</li>
</ol>
<p><strong>Note</strong> that in 2.2.0, the <strong>bin/create</strong> script will copy in the CordovaLib sub-project into your project now. To have the same kind of setup, just copy in the right CordovaLib into your project folder, and update the CordovaLib sub-project location (relative to the project) in the Xcode <a href="cordova_file_file.md.html#File">File</a> Inspector.</p>

<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_2_0_0_projects_to_2_1_0">Upgrading Cordova 2.0.0 projects to 2.1.0</a>
</h2>

<p>With <strong>Cordova 2.1.0</strong>, CordovaLib has been upgraded to use <strong>Automatic Reference Counting (ARC)</strong>. You don't need to upgrade to <strong>ARC</strong> to use CordovaLib, but if you want to upgrade your project to use <strong>ARC</strong>, please use the Xcode migration wizard from the menu: <strong>Edit -&gt; Refactor -&gt; Convert to Objective-C ARC…</strong>, <strong>de-select libCordova.a</strong>, then run the wizard to completion. </p>

<ol>
<li>
<strong>Download and extract the Cordova 2.1.0 source</strong> to a <strong>permanent folder location</strong> on your hard drive (say to ~/Documents/Cordova-2.1.0)</li>
<li>
<strong>Quit Xcode</strong> if it is running.</li>
<li>
<strong>Navigate</strong> to the directory where you put the downloaded source above, using <strong>Terminal.app</strong>.</li>
<li>
<a href="guide_command-line_index.md.html#Command-Line%20Usage_ios"><strong>Create a new project</strong></a> from the command-line tools - you will have to grab the assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-2.1.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-2.0.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-2.1.0.js</strong> file</li>
<li>Update (or replace, if you never changed the file) your <strong>AppDelegate.m</strong> according to the one from the new project:
<ul>
<li>Edited -&gt; application:didFinishLaunchingWithOptions:</li>
<li>Added  -&gt; application:supportedInterfaceOrientationsForWindow:</li>
</ul>
</li>
<li>Update (or replace, if you never changed the file) your <strong>MainViewController.m</strong> according to the one from the new project:
<ul>
<li>Added -&gt; viewWillAppear</li>
</ul>
</li>
<li>Copy the <strong>"cordova"</strong> folder from the new project into your project's root folder <strong>(in 2.1.0, this has the updated scripts to support paths with spaces)</strong> </li>
<li>Remove the <strong>VERSION</strong> file reference from your <strong>project</strong> (<strong>NOT</strong> the one in CordovaLib)</li>
<li>
<p>Next, update your CordovaLib sub-project reference. Beginning with Cordova 2.1.0, we are not using the CORDOVALIB Xcode variable anymore when referencing where CordovaLib resides, the reference is an absolute file reference now.</p>

<ol>
<li>Launch <strong>Terminal.app</strong>
</li>
<li>Go to the location where you installed Cordova <strong>(see Step 1)</strong>, in the <strong>bin</strong> sub-folder</li>
<li>
<p>Run the script below where the first parameter is the path to your project's <strong>.xcodeproj</strong> file:</p>

<p><code>update_cordova_subproject path/to/your/project/xcodeproj</code></p>
</li>
</ol>
</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_9_0_projects_to_2_0_0">Upgrading Cordova 1.9.0 projects to 2.0.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 2.0.0</li>
<li>
<a href="guide_command-line_index.md.html#Command-Line%20Usage_ios"><strong>Create a new project</strong></a> from the command-line tools - you will have to grab the assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-2.0.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.9.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-2.0.0.js</strong> file</li>
<li>Copy the <strong>"cordova"</strong> folder from the new project into your project's root folder (if you want the project command-line tools) </li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>Cordova.plist</strong> file (under the <strong>Supporting Files</strong> group) - the key is <strong><a href="cordova_device_device.md.html#Device">Device</a></strong> and the value is <strong>CDVDevice</strong>
</li>
<li>Remove <strong>Cordova.framework</strong>
</li>
<li>Remove <strong>verify.sh</strong> from the <strong>Supporting Files</strong> group</li>
<li>Select the <strong>project icon</strong> in the Project Navigator, select your project <strong>Target</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>Search for <strong>"Preprocessor Macros"</strong>, then remove all <strong>"CORDOVA_FRAMEWORK=1"</strong> values</li>
<li>Locate the <strong>CordovaLib</strong> folder that was installed in your hard-drive under your home folder's <strong>Documents</strong> sub-folder.</li>
<li>Locate the <strong>CordovaLib.xcodeproj</strong> file in the <strong>CordovaLib</strong> folder, then <strong>drag and drop</strong> the file into your project - it should appear as a <strong>sub-project</strong>.</li>
<li>
<strong>Build</strong> your project, you should get some <strong>errors</strong> relating to <strong>#import</strong> directives</li>
<li>
<p>For the <strong>#import errors</strong>, change any <strong>quote-based</strong> imports in this style:</p>

<pre class="prettyprint"><code>#import "CDV.h"
</code></pre>

<p>to this <strong>brackets-based</strong> style:</p>

<pre class="prettyprint"><code>#import &lt;Cordova/CDV.h&gt;
</code></pre>

<p>and remove any <strong>#ifdef</strong> wrappers around any Cordova imports, they are not needed anymore (the imports are <strong>unified</strong> now)    </p>
</li>
<li>
<strong>Build</strong> your project again, and it should not have any <strong>#import</strong> errors.</li>
<li>Select the <strong>project icon</strong> in the Project Navigator, select your project <strong>Target</strong>, then select the <strong>"Build Phases"</strong> tab</li>
<li>Expand the <strong>"Target Dependencies"</strong> phase, then select the <strong>"+"</strong> button</li>
<li>Select the <strong>"CordovaLib"</strong> target, then select the <strong>"Add"</strong> button</li>
<li>Expand the <strong>first</strong> <strong>"Link Binary with Libraries"</strong> phase (it should already contain a bunch of frameworks), then select the <strong>"+"</strong> button</li>
<li>Select the <strong>libCordova.a</strong> static library, then select the <strong>"Add"</strong> button</li>
<li>Delete the <strong>"Run Script"</strong> phase.</li>
<li>Select the <strong>project icon</strong> in the Project Navigator, select your project <strong>Target</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>Search for <strong>"Other Linker <a href="cordova_file_file.md.html#Flags">Flags</a>"</strong>, and add the values <strong>-all_load</strong> and <strong>-Obj-C</strong>
</li>
<li>Expand the <strong>"CordovaLib" sub-project</strong>
</li>
<li>Locate the <strong>"VERSION"</strong> file, drag it into your main project (we want to create a link to it, not a copy)</li>
<li>Select the <strong>"Create groups for any added folders"</strong> radiobutton, then select the <strong>"Finish"</strong> button</li>
<li>Select the <strong>"VERSION"</strong> file that you just dragged in a previous step</li>
<li>Press the key combination <strong>Option-Command-1</strong> to <a href="cordova_splashscreen_splashscreen.md.html#show">show</a> the <strong><a href="cordova_file_file.md.html#File">File</a> Inspector</strong> (or menuitem <strong>View -&gt; Utilities -&gt; Show <a href="cordova_file_file.md.html#File">File</a> Inspector</strong>)</li>
<li>Choose <strong>"Relative to CORDOVALIB"</strong> in the <strong><a href="cordova_file_file.md.html#File">File</a> Inspector</strong> for the drop-down menu for <strong>Location</strong>
</li>
<li>Set the Xcode preference <strong>"Xcode Preferences -&gt; Locations -&gt; Derived Data -&gt; Advanced…"</strong> to <strong>"Unique"</strong> (this is so the unified headers can be found)</li>
<li>Select the <strong>project icon</strong> in the Project Navigator, select your <strong>Target</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>
<p>Search for <strong>"Header Search Paths"</strong>. For that setting, add these three values below (with quotes):</p>

<pre class="prettyprint"><code>"$(TARGET_BUILD_DIR)/usr/local/lib/include"


"$(OBJROOT)/UninstalledProducts/include"


"$(BUILT_PRODUCTS_DIR)"
</code></pre>
</li>
<li>
<p>Search for <strong>"Other Linker <a href="cordova_file_file.md.html#Flags">Flags</a>"</strong>. For that setting, add this value below:</p>

<pre class="prettyprint"><code>-weak_framework CoreFoundation
</code></pre>
</li>
<li><p><strong>Build</strong> your project, it should compile and link with <strong>no issues</strong>.</p></li>
<li>
<strong>Select your project</strong> from the <strong>Scheme</strong> drop-down, and then select <strong>"iPhone 5.1 Simulator"</strong>
</li>
<li>Select the <strong>Run</strong> button</li>
</ol>
<p><strong>NOTE:</strong><br> 
If your project is <strong>not working</strong> as expected in the Simulator, please <strong>take a note of any errors</strong> in the <strong>console log in Xcode</strong> for clues.</p>

<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_8_x_projects_to_1_9_0">Upgrading Cordova 1.8.x projects to 1.9.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.9.0</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.9.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.8.x.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-1.9.0.js</strong> file</li>
</ol>
<p><strong>Note:</strong></p>

<p>1.9.0 supports the new <strong>"BackupWebStorage"</strong> boolean setting in Cordova.plist. By default, this setting is turned on, set it to "false" to turn it off - especially for iOS 6 - see <a class="external" href="https://developer.apple.com/library/prerelease/ios/#releasenotes/General/RN-iOSSDK-6_0/_index.html">Release Notes - Safari and UIKit Section</a></p>

<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_7_0_projects_to_1_8_x">Upgrading Cordova 1.7.0 projects to 1.8.x</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.8.0</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.8.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.7.x.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-1.8.0.js</strong> file</li>
</ol>
<p>If you intend on using the <strong><a href="cordova_media_capture_capture.md.html#Capture">Capture</a> API</strong>, you will need the new <strong>iPad retina-display</strong> assets:</p>

<ol>
<li>
<strong>Copy</strong> the <strong>Resources/<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>.bundle</strong> item from the new project into your project folder, over-writing your existing <strong>Resources/<a href="cordova_media_capture_capture.md.html#Capture">Capture</a>.bundle</strong> item</li>
<li>In your project, select the <strong><a href="cordova_media_capture_capture.md.html#Capture">Capture</a>.bundle</strong> item into Xcode into your Project Navigator, and press the <strong>Delete</strong> key, then select <strong>Remove Reference</strong> from the dialog that pops up.</li>
<li>Drag the new <strong><a href="cordova_media_capture_capture.md.html#Capture">Capture</a>.bundle</strong> from Step 1. above into Xcode into your Project Navigator, and select the <strong>Create groups for any added folders</strong> radio-button</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_6_x_projects_to_1_7_0">Upgrading Cordova 1.6.x projects to 1.7.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.7.0</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.7.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.6.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-1.7.0.js</strong> file</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_5_0_projects_to_1_6_x">Upgrading Cordova 1.5.0 projects to 1.6.x</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.6.1</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong>, <strong>AppDelegate.h</strong>, <strong>MainViewController.m</strong>, <strong>MainViewController.h</strong>, and <strong>Cordova.plist</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.5.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>

<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
Cordova.plist
</code></pre>
</li>
<li>
<strong>Add</strong> all the new <strong>MainViewController</strong> and <strong>AppDelegate</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.6.1.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/cordova-1.5.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>cordova-1.6.1.js</strong> file</li>
<li>
<strong>Add</strong> the new <strong>Cordova.plist</strong> file into your project - this is because the core plugin service names needed to be changed to match the ones from Android and Blackberry, for a unified Cordova JavaScript file (cordova-js). </li>
<li>
<strong>Integrate</strong> any settings, <strong>Plugins</strong> and <strong>ExternalHosts</strong> entries that you had in your <strong>backed-up Cordova.plist</strong> into the new <strong>Cordova.plist</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files. Any <strong>UIWebViewDelegate</strong> or <strong>CDVCommandDelegate</strong> code in <strong>AppDelegate.m</strong> will need to go into MainViewController.m now (see commented out sections in that file)</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up MainViewController.h and MainViewController.m</strong> into the new MainViewController files</li>
<li>Click on the <strong>project icon</strong> in the Project Navigator, select your <strong>Project</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>Enter <strong>"Compiler for C/C++/Objective-C"</strong> in the search field</li>
<li>Select the <strong>"Apple LLVM Compiler 3.1"</strong> value</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_4_x_projects_to_1_5_0">Upgrading Cordova 1.4.x projects to 1.5.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.5.0</li>
<li>
<strong>Create a new project</strong> and run it once - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>www/cordova-1.5.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.4.x.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new Cordova <strong>cordova-1.5.0.js</strong> file</li>
<li>Find <strong>"PhoneGap.framework"</strong> in your Project Navigator, select it</li>
<li>Press the <strong>Delete</strong> key and delete the <strong>"PhoneGap.framework"</strong> reference in the Project Navigator</li>
<li>Press the key combination <strong>Option-Command-A</strong>, which should drop down a sheet to add files to your project (the <strong>"Add Files..." sheet</strong>). Make sure the <strong>"Created groups for any added folders"</strong> radio-button is selected</li>
<li>Press the key combination <strong>Shift-Command-G</strong>, which should drop down another sheet for you to go to a folder (the <strong>"Go to the folder:" sheet</strong>)</li>
<li>Enter <strong>"/Users/Shared/Cordova/Frameworks/Cordova.framework"</strong> in the <strong>"Go to the folder:" sheet</strong> and then press the <strong>"Go"</strong> button</li>
<li>Press the <strong>"Add"</strong> button in the <strong>"Add Files..." sheet</strong>
</li>
<li>
<strong>Select "Cordova.framework"</strong> in the Project Navigator</li>
<li>Press the key combination <strong>Option-Command-1</strong> to <a href="cordova_splashscreen_splashscreen.md.html#show">show</a> the <strong><a href="cordova_file_file.md.html#File">File</a> Inspector</strong>
</li>
<li>Choose <strong>"Absolute Path"</strong> in the <strong><a href="cordova_file_file.md.html#File">File</a> Inspector</strong> for the drop-down menu for <strong>Location</strong>
</li>
<li>Press the key combination <strong>Option-Command-A</strong>, which should drop down a sheet to add files to your project (the <strong>"Add Files..." sheet</strong>). Make sure the <strong>"Created groups for any added folders"</strong> radio-button is selected</li>
<li>Press the key combination <strong>Shift-Command-G</strong>, which should drop down another sheet for you to go to a folder (the <strong>"Go to the folder:" sheet</strong>)</li>
<li>Enter <strong>"~/Documents/CordovaLib/Classes/deprecated"</strong> in the <strong>"Go to the folder:" sheet</strong> and then press the <strong>"Go"</strong> button</li>
<li>Press the <strong>"Add"</strong> button in the <strong>"Add Files..." sheet</strong>
</li>
<li>
<p>In your <strong>AppDelegate.h, AppDelegate.m, and MainViewController.h</strong> files - replace the whole <strong>#ifdef PHONEGAP_FRAMEWORK</strong> block with:</p>

<pre class="prettyprint"><code>#import "CDVDeprecated.h"
</code></pre>
</li>
<li>Click on the <strong>project icon</strong> in the Project Navigator, select your <strong>Target</strong>, then select the <strong>"Build Settings"</strong> tab</li>
<li>Search for <strong>"Framework Search Paths"</strong>
</li>
<li>Replace the existing value with <strong>"/Users/Shared/Cordova/Frameworks"</strong> </li>
<li>Search for <strong>"Preprocessor Macros"</strong>
</li>
<li>For the first (combined) value, replace the value with <strong>"CORDOVA_FRAMEWORK=YES"</strong>
</li>
<li>Select the <strong>"Build Phases"</strong> tab</li>
<li>Expand <strong>"Run Script"</strong>
</li>
<li>Replace any occurrences of <strong>PhoneGap</strong> with <strong>Cordova</strong>
</li>
<li>Find your <strong>"PhoneGap.plist"</strong> file in the Project Navigator, and click on the filename once to enter name edit mode</li>
<li>Rename <strong>"PhoneGap.plist"</strong> to <strong>"Cordova.plist"</strong>
</li>
<li>Right-click on <strong>"Cordova.plist"</strong> and choose <strong>"Open As" --&gt; "Source Code"</strong>
</li>
<li>Press <strong>Option-Command-F</strong>, choose <strong>"Replace"</strong> from the drop-down on the top left of the Source window</li>
<li>Enter <strong>com.phonegap</strong> for the Find string, and <strong>org.apache.cordova</strong> for the Replace string - then press the <strong>"Replace All"</strong> button</li>
<li>Enter <strong>PG</strong> for the Find string, and <strong>CDV</strong> for the Replace string - then press the <strong>"Replace All"</strong> button</li>
<li>Press <strong>Command-B</strong> to build, you will still have deprecations that you can get rid of in the future (see <strong>CDVDeprecated.h</strong> - replace classes in your code that use PG* to CDV*, for example)</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_4_0_projects_to_1_4_1">Upgrading Cordova 1.4.0 projects to 1.4.1</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.4.1</li>
<li>
<strong>Make a backup</strong> of <strong>MainViewController.m</strong>
</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<strong>Copy</strong> the <strong>MainViewController.m</strong> file from the <strong>new</strong> project into your 1.4.0 based project folder on disk, <strong>replacing</strong> the old file (<strong>backup</strong> your files first from step 2 above).</li>
<li>
<strong>Add</strong> the <strong>MainViewController.m</strong> file into your Xcode project</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up MainViewController.m</strong> into the new file</li>
<li>Updating the phonegap-X.X.X.js file is optional, nothing has changed in the JavaScript between 1.4.0 and 1.4.1</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_3_0_projects_to_1_4_0">Upgrading Cordova 1.3.0 projects to 1.4.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.4.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.3.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>

<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.4.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.3.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.4.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_2_0_projects_to_1_3_0">Upgrading Cordova 1.2.0 projects to 1.3.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.3.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.2.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>

<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.3.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.2.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.3.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_1_0_projects_to_1_2_0">Upgrading Cordova 1.1.0 projects to 1.2.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.2.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.1.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>

<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.2.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.1.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.2.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_1_0_0_projects_to_1_1_0">Upgrading Cordova 1.0.0 projects to 1.1.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.1.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 1.0.0 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>

<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.1.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-1.0.0.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.1.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
<h2>
<a name="Upgrading%20Cordova%20iOS_upgrading_cordova_0_9_6_projects_to_1_0_0">Upgrading Cordova 0.9.6 projects to 1.0.0</a>
</h2>

<ol>
<li>
<strong>Install</strong> Cordova 1.0.0</li>
<li>
<strong>Make a backup</strong> of <strong>AppDelegate.m</strong> and <strong>AppDelegate.h</strong> in your project</li>
<li>
<strong>Create a new project</strong> - you will have to grab assets from this new project</li>
<li>
<p><strong>Copy</strong> these files from the <strong>new</strong> project into your 0.9.6 based project folder on disk, <strong>replacing</strong> any old files (<strong>backup</strong> your files first from step 2 above):</p>

<pre class="prettyprint"><code>AppDelegate.h
AppDelegate.m
MainViewController.h
MainViewController.m
MainViewController.xib
</code></pre>
</li>
<li>
<strong>Add</strong> all the <strong>MainViewController</strong> files into your Xcode project</li>
<li>
<strong>Copy</strong> the <strong>www/phonegap-1.0.0.js</strong> file from the new project into your <strong>www</strong> folder, and delete your <strong>www/phonegap-0.9.6.js</strong> file</li>
<li>
<strong>Update</strong> the Cordova script reference in your <strong>www/index.html</strong> file (and any other files that contain the script reference) to point to the new <strong>phonegap-1.0.0.js</strong> file</li>
<li>
<strong>Add</strong> a new entry under <strong>Plugins</strong> in your <strong>PhoneGap.plist</strong> file - key is <strong>com.phonegap.battery</strong> and the value is <strong>PGBattery</strong>
</li>
<li>
<strong>Integrate</strong> any project specific code that you have in your <strong>backed-up AppDelegate.h and AppDelegate.m</strong> into the new AppDelegate files</li>
</ol>
</div>
        </div>

        <!-- Functionality and Syntax Highlighting -->
        <script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
</body>
</html>
